<template>
  <div>
    <div v-for="(item, index) in list" :key="index">
      <div class="detailsList-warp">
        <div class="">
          <div>
            <img src="../../assets/logo.png" alt="" />
          </div>
        </div>
        <div class="text-warp">
          <div class="user">
            <span class="username">{{item.name}}</span>
            <span class="spans">
              9999999
              <i class="iconfont iconzan"></i>
            </span>
          </div>
          <span class="content">
            {{ item.content }}
          </span>
          <div class="huifu">
            <button>260回复></button>
            <span>{{ item.t }}</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { mapActions, mapState } from "vuex";
import { getItem } from '../../utils/sessiton';
export default {
  props: ["item"],
  methods: {
    ...mapActions("discuss", ["getDiscussList"]),
  },
  mounted() {
    this.getDiscussList(this.item);
  },
  computed: {
    ...mapState("discuss", ["list"]),
  },
};
</script>

<style scoped>
.detailsList-warp {
  width: 100%;
  display: flex;
  margin-bottom: 30px;
}

.text-warp {
  margin: 0 10px;
  display: flex;
  flex-direction: column;
  width: 88%;
  height: 100%;
}

.user {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.username {
  font-size: 15px;
  font-weight: 600;
  margin-top: 5px;
}

.content {
  width: 100%;
  margin-bottom: 20px;
  font-size: 18px;
  overflow-wrap: break-word;
  word-break: break-all;
}

.huifu {
  display: flex;
  align-items: center;
}

.huifu > button {
  width: 90px;
  border-radius: 20px;
  border: none;
  height: 30px;
  outline: none;
  text-align: center;
  line-height: 30px;
  font-size: 13px;
}

.huifu > span {
  margin-left: 10px;
  color: #ccc;
  font-size: 14px;
}

.spans {
  margin-top: 5px;
}

img {
  width: 32px;
  height: 32px;
}
</style>